package bairui.international.console.web.controller.barter.category;

import com.lianjing.sh.spring.web.controller.enhance.module.Module;
import com.lianjing.sh.spring.web.controller.enhance.module.ModuleHead;
import com.lianjing.sh.spring.web.controller.enhance.module.body.InfoModuleBody;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.DataDisplay;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.DataType;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.OutputBean;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.OutputBeanGroup;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.OutputType;
import com.lianjing.sh.spring.web.controller.enhance.output.bean.OutputWay;

import bairui.international.console.web.controller.barter.category.properties.C_Barter_Category_PropertiesDetail_PageAccess;

/**
 *
 * Module_Info
 *
 */
class Module_Info{

	
	/**
	 * 信息模块
	 */
	public Module module(
		Module_Info_OutputModel bean, 
		C_Barter_Category_PropertiesDetail_PageAccess.PageAccess.Operate c_Barter_Category_PropertiesDetail_PageAccess_PageAccess_Operate
	){
		return
			new Module(
					new ModuleHead("信息")
						.addOperate(
							c_Barter_Category_PropertiesDetail_PageAccess_PageAccess_Operate
								.defaultComment("编辑属性")
								.defaultTarget(com.lianjing.sh.spring.web.controller.base.operate.OperateTarget.Popup)
						)
					, 
					new InfoModuleBody(
								bean
							,
							new OutputBeanGroup(
									OutputWay.Vertical, 
									OutputData.info()
								)
						)
				);
	}
	
	/**
	 * 输出信息
	 */
	private static class OutputData {
	
		private static final OutputBean[] info() {
			OutputData outputData = new OutputData();
			return new OutputBean[]{
						outputData.getName(),
						outputData.getNumber(),
						outputData.getOrderValue(),
						outputData.getProductPropertyToString(),
						outputData.getCreateTime(),
						outputData.getModifyTime(),
				};
		}
	
		OutputBean getName(){
			return new OutputBean("name", "名称", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getNumber(){
			return new OutputBean("number", "代码", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getOrderValue(){
			return new OutputBean("orderValue", "排序值", true, DataDisplay.Show, DataType.Integer, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getProductPropertyToString(){
			return new OutputBean("productPropertyToStringToString", "属性", true, DataDisplay.Show, DataType.Object, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getCreateTime(){
			return new OutputBean("createTime", "创建时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getModifyTime(){
			return new OutputBean("modifyTime", "最后修改时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
	}
	
	
	
	
	/**
	 * 输出模型
	 */
	

}
